const gulp = require("gulp");
const path = require("path");

const destFolder = path.join(__dirname, "../test-aup");

let files = [
    "index.html",
    "index.js",
    "index.css",
    [
        "global/assets/**/*",
        "global/assets"
    ],
    [
        "certificate/assets/**/*",
        "certificate/assets"
    ],
    [
        "message/assets/**/*",
        "message/assets"
    ],
    [
        "penyouquan/assets/**/*",
        "penyouquan/assets",
    ],
    [
        "transfer/assets/**/*",
        "transfer/assets"
    ]
].map(function (v) {
    let src, dest;
    if (Array.isArray(v)) {
        src = path.join(__dirname, v[0]);
        dest = path.join(destFolder, v[1]);
    } else {
        src = path.join(__dirname, v);
        dest = destFolder;
    }
    return function () {
        gulp.src(src)
            .pipe(gulp.dest(dest));
    }
});

files.forEach(function (a) {
    a();
})

